package com.liziyi0914.morearmor.event.entity;

import com.liziyi0914.morearmor.event.Event;
import lombok.AllArgsConstructor;
import lombok.Getter;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;

/**
 * 2021/6/28<br>
 * MoreArmor<br>
 *
 * @author huanmeng_qwq
 */
@AllArgsConstructor
@Getter
public class EntityClickEvent extends Event {
    private final LivingEntity entity;
    private final boolean left;
    private final LivingEntity target;
    private final BlockPos pos;
    private final ItemStack itemStack;
    private final boolean sneak;

    public boolean isRight() {
        return !left;
    }

    public boolean hasTarget() {
        return target != null;
    }

    public boolean hasPos() {
        return pos != null;
    }

    public boolean hasItem() {
        return itemStack != null;
    }
}
